import pymongo

client = pymongo.MongoClient(host='192.168.2.159', port=27017)
# 选择数据库
db = client.big
# 选择集合
collection = db.test

student = {
	'id': '20170101',
	'name': 'Jordan',
	'age': 20,
	'gender': 'male'
}


result = collection.insert_one(student)
print(result.inserted_id)


# result = collection.find_one({'name': 'Jordan'})
# print(result)
#
# result = collection.remove({'name': 'Jordan'})
# print(result)
#
# result = collection.find_one({'name': 'Jordan'})
# print(result)
